
<!--排行榜单页面-->

<template>
  <div class="body">
    <catshit-header active-index="3"></catshit-header>
    <div class="main">
      <film-list :film-list="filmList"></film-list>
    </div>
  </div>
</template>

<script>
  import CatshitHeader from "../../components/CatshitHeader";
  import RankingList from "../../components/RankingList";
  import FilmList from "../../components/FilmList";
    export default {
      name: "BoxRanking",
      components:{FilmList, CatshitHeader,RankingList},
      data(){
        return{
          filmList:[],
          filmListSize:Number,
          page:1,
        }
      },
      mounted() {
        this.getFilmList();
      },
      methods:{
        handlePageChange(param){
          console.log("current page:" +param);
          this.page=param;
          this.getFilmList();
        },
        getFilmList(){
            this.$axios.post('search',{queryString:''}).then(res=>{
                if(res.data.code){
                  this.$message.error('出错了')
                  return
                }
                this.filmList=res.data.msg
            })
        },
      },
    }
</script>

<style scoped>
  .body{
    display: flex;
    background-color: aliceblue;
    justify-content: center;
  }
  .main{
    margin-top: 60px;
    width: 70%;
    background-color: white;
  }
</style>
